﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BoldBrick.Web.Parameters
{
    /// <summary>
    /// Attribute that identifies a query parameter on a data type.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    public class ParameterNameAttribute : Attribute
    {
        /// <summary>
        /// Name of parameter in querystring
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Constructs new parameter with its name
        /// </summary>
        /// <param name="name">name of new parameter</param>
        public ParameterNameAttribute(string name)
        {
            this.Name = name;
        }
    }
}
